package com.hwh.service.emp.impl;

import java.util.List;

import com.hwh.DAO.emp.EmpDayDetailDAO;
import com.hwh.model.emp.EmpDayDetail;
import com.hwh.service.emp.EmpDayDetailService;

public class EmpDayDetailServiceImpl implements EmpDayDetailService {

	private EmpDayDetailDAO empDayDetailDAO;
	public EmpDayDetailDAO getEmpDayDetailDAO() {
		return empDayDetailDAO;
	}

	public void setEmpDayDetailDAO(EmpDayDetailDAO empDayDetailDAO) {
		this.empDayDetailDAO = empDayDetailDAO;
	}

	public void addEmpDayDetail(EmpDayDetail empDayDetail) {
		empDayDetailDAO.save(empDayDetail);

	}

	public void deleteEmpDayDetail(String id) {
		empDayDetailDAO.delete(empDayDetailDAO.findById(id));

	}

	public void updataEmpDayDetail(EmpDayDetail empDayDetail) {
		empDayDetailDAO.save(empDayDetail);

	}

	public List findEmpDayDetail(String propertyName, Object value) {
		// TODO Auto-generated method stub
		return empDayDetailDAO.findByProperty(propertyName, value);
	}

	public List findAllEmpDayDetail() {
		// TODO Auto-generated method stub
		return empDayDetailDAO.findAll();
	}

	public List findByPage(int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return empDayDetailDAO.findByPage(currentPage, pageSize);
	}

}
